using System;

[Serializable]
public class HeadshotKillEvent : KillEvent
{
	public float maxDistance;

	public float minDistance;

	public override bool IfEvent(KillInfo newKill)
	{
		if (newKill.headshot && weaponType == newKill.weaponType)
		{
			if (maxDistance > 0f)
			{
				if (newKill.distance < maxDistance)
				{
					return true;
				}
			}
			else if (minDistance > 0f && newKill.distance > minDistance)
			{
				return true;
			}
		}
		return false;
	}
}
